$(document).ready(function(){
	$.ajax({
		url: "service/ejemplo/get/" + "sarasa",
		dataType: "json",
		type: "GET",
		success: function(data){
			alert(data);
		}
	});
	
	$("#salida").keypress(function(e){
		if (e.keyCode == 13){
			enviar();
		}
	});
});

function enviar(){
	$.ajax({
		url: "service/ejemplo/post/",
		data : $("#salida").val(),
		dataType: "json",
		type: "POST",
		success: function(data){
			alert(data);
		}
	});
}